﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 设计模式
{
    class kaoshi
    {
        public static void main()
        {
            TestPaper a = new TestPaperA();
            a.TestQuestion1();
            a.TestQuestion2();
            a.TestQuestion3();


            TestPaper b = new TestPaperB();
            b.TestQuestion1();
            b.TestQuestion2();
            b.TestQuestion3();

            Console.Read();

        }

    }

    class TestPaper
    {
        public void TestQuestion1()
        {
            Console.WriteLine("杨过得到，后来给了郭靖，练成倚天剑的物质可能是（）   a.铸铁 b.合金钢 c.马口铁 d.碳素纤维  ");
            Console.WriteLine("答案： " + Answer1());
        }

        public void TestQuestion2()
        {
            Console.WriteLine("杨过，程英，陆无双铲除了情花，造成（）   a.这种植物不再害人 b.珍惜植物的灭绝 c.生态环境的破坏 d.该地区的沙漠化  ");
            Console.WriteLine("答案： " + Answer2());
        }

        public void TestQuestion3()
        {
            Console.WriteLine("蓝凤凰造成华山师徒，桃谷六仙呕吐不止，如果你是大夫会给他们什么药（）   a.阿司匹林 b.牛黄解毒 c.六味地黄丸 d.喝生牛奶  ");
            Console.WriteLine("答案： " + Answer3());
        }


        protected virtual string Answer1() {
            return "";
        }

        protected virtual string Answer2()
        {
            return "";
        }

        protected virtual string Answer3()
        {
            return "";
        }

    }


    class TestPaperA : TestPaper
    {
        protected override string Answer1()
        {
            return "b";
        }

        protected override string Answer2()
        {
            return "c";
        }

        protected override string Answer3()
        {
            return "a";
        }

    }

    class TestPaperB : TestPaper
    {
        protected override string Answer1()
        {
            return "a";
        }

        protected override string Answer2()
        {
            return "c";
        }

        protected override string Answer3()
        {
            return "d";
        }

        

    }


   

}
